const { defineConfig } = require('@vue/cli-service')
const path = require('path')
module.exports = defineConfig({
  transpileDependencies: true,
  pages: {
    index: {
      entry: 'src/main.js',
      title: '你拍我查'
    },
    article: {
      entry: 'src/article.js',
      title: '动态新闻'
    }
  },
  pwa: {
    iconPaths: {
      faviconSVG: null,
      favicon32: 'favicon.ico',
      favicon16: 'favicon.ico',
      appleTouchIcon: null,
      maskIcon: null,
      msTileImage: null
    }
  },
  configureWebpack: {
    resolve: {
      alias: {
        '@assets': path.join(__dirname, './src/assets'),
        '@components': path.join(__dirname, './src/components'),
        '@utils': path.join(__dirname, './src/utils')
      }
    }
  },
  productionSourceMap: false,
  devServer: {
    proxy: {
      '/api': {
        target: 'http://42.192.18.169:8002',
        changeOrigin: true
      }
    }
  }
})
